import { create } from "zustand";
type SidebarState = {
  selected: string;
  parent: string;
  updateSelected: (new_selected: string, parent: string) => void;
};

export const useSidebarStore = create<SidebarState>()((set) => ({
  selected: "数据列表",
  parent: "数据中心",
  updateSelected: (new_selected, new_parent) =>
    set({ selected: new_selected, parent: new_parent }),
}));
